package com.jojo.store.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jojo.store.entity.Address;

import java.util.List;

public interface IAddressService {
    void addAddress(Address address,Integer uid,String username);

    /**
     * 根据uid查看本uid旗下的地址；
     * @param uid
     * @return
     */
    List<Address> findByuidAddress(Integer uid);

    /**
     * 更改默认
     * @param uid
     * @param aid
     * @param username
     */
    void changeDefault(Integer uid,Integer aid,String username);

//分页
    IPage<Address> getAllBypage(Page<Address> page,Integer uid);


    void deleteAndDef(Integer uid,Integer aid,String username);
}
